﻿using Bigger.Demo.DbModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Bigger.Demo.Businesses
{
    public interface IProductBiz
    {
        /// <summary>
        /// 获取商品列表
        /// </summary>
        /// <returns></returns>
        IList<PruductModel> GetList();
        /// <summary>
        /// 分页获取商品列表
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        IList<PruductModel> GetPageList(int pageIndex, int pageSize);
        /// <summary>
        /// 分页获取商品列表并获取总数
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="recordCount"></param>
        /// <returns></returns>
        IList<PruductModel> GetPageList(int pageIndex, int pageSize, out long recordCount);
        /// <summary>
        /// 根据商品编号获取商品
        /// </summary>
        /// <param name="productId"></param>
        /// <returns></returns>
        PruductModel GetItem(int productId);
        /// <summary>
        /// 获取商品总数
        /// </summary>
        /// <returns></returns>
        long Count();
    }
}
